﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Ruirun.Mes.Migrations
{
    /// <inheritdoc />
    public partial class init1 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "StorageNo",
                table: "wms_WareHouseAreaPos");

            migrationBuilder.AlterColumn<Guid>(
                name: "WareHouseAreaId",
                table: "wms_WareHouseAreaPos",
                type: "char(128)",
                nullable: false,
                comment: "关联库区",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "关联库区")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_WareHouseAreaPos",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Channel",
                table: "wms_WareHouseAreaPos",
                type: "VARCHAR(256)",
                maxLength: 256,
                nullable: true,
                comment: "通道")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Group",
                table: "wms_WareHouseAreaPos",
                type: "VARCHAR(256)",
                maxLength: 256,
                nullable: true,
                comment: "组")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "WareHouseId",
                table: "wms_WareHouseArea",
                type: "char(128)",
                nullable: false,
                comment: "关联仓库",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "关联仓库")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_WareHouseArea",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_WareHouse",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "MaterialId",
                table: "wms_MaterialOutStorage",
                type: "char(128)",
                nullable: false,
                comment: "MaterialId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "MaterialId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_MaterialOutStorage",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "MaterialId",
                table: "wms_MaterialInStorage",
                type: "char(128)",
                nullable: false,
                comment: "MaterialId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "MaterialId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_MaterialInStorage",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "ParentId",
                table: "wms_MaterialCategory",
                type: "char(128)",
                nullable: true,
                comment: "父编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldNullable: true,
                oldComment: "父编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_MaterialCategory",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "WareHouseId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "WareHouseId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "WareHouseAreaPosId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseAreaPosId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "WareHouseAreaPosId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "WareHouseAreaId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseAreaId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "WareHouseAreaId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "IPNId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "IPNId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "IPNId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_Material",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "MaterialCategoryId",
                table: "wms_IPN",
                type: "char(128)",
                nullable: false,
                comment: "MaterialCategoryId",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldComment: "MaterialCategoryId")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "wms_IPN",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "DictId",
                table: "SYS_DictEntry",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "字典编码",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "字典编码")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "SYS_DictEntry",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<Guid>(
                name: "Id",
                table: "SYS_Dict",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                collation: "ascii_general_ci",
                oldClrType: typeof(string),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Channel",
                table: "wms_WareHouseAreaPos");

            migrationBuilder.DropColumn(
                name: "Group",
                table: "wms_WareHouseAreaPos");

            migrationBuilder.AlterColumn<string>(
                name: "WareHouseAreaId",
                table: "wms_WareHouseAreaPos",
                type: "char(128)",
                nullable: false,
                comment: "关联库区",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "关联库区")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_WareHouseAreaPos",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AddColumn<string>(
                name: "StorageNo",
                table: "wms_WareHouseAreaPos",
                type: "VARCHAR(256)",
                maxLength: 256,
                nullable: true,
                comment: "货架号")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "WareHouseId",
                table: "wms_WareHouseArea",
                type: "char(128)",
                nullable: false,
                comment: "关联仓库",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "关联仓库")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_WareHouseArea",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_WareHouse",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "MaterialId",
                table: "wms_MaterialOutStorage",
                type: "char(128)",
                nullable: false,
                comment: "MaterialId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "MaterialId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_MaterialOutStorage",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "MaterialId",
                table: "wms_MaterialInStorage",
                type: "char(128)",
                nullable: false,
                comment: "MaterialId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "MaterialId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_MaterialInStorage",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "ParentId",
                table: "wms_MaterialCategory",
                type: "char(128)",
                nullable: true,
                comment: "父编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldNullable: true,
                oldComment: "父编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_MaterialCategory",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "WareHouseId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "WareHouseId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "WareHouseAreaPosId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseAreaPosId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "WareHouseAreaPosId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "WareHouseAreaId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "WareHouseAreaId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "WareHouseAreaId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "IPNId",
                table: "wms_Material",
                type: "char(128)",
                nullable: false,
                comment: "IPNId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "IPNId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_Material",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "MaterialCategoryId",
                table: "wms_IPN",
                type: "char(128)",
                nullable: false,
                comment: "MaterialCategoryId",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldComment: "MaterialCategoryId")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "wms_IPN",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "DictId",
                table: "SYS_DictEntry",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "字典编码",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "字典编码")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "SYS_DictEntry",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "SYS_Dict",
                type: "char(128)",
                maxLength: 128,
                nullable: false,
                comment: "编号",
                oldClrType: typeof(Guid),
                oldType: "char(128)",
                oldMaxLength: 128,
                oldComment: "编号")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("Relational:Collation", "ascii_general_ci");
        }
    }
}
